<template>
	<div class="main">
		<van-field label="管理制度名称" v-model="data.TemplateName" name="title" readonly>
		</van-field>

		<van-field label="模板类别" v-model="data.TemplateTypeName" name="title" readonly>
		</van-field>

		<van-field label="是否必须上传" v-model="data.IsMustInputName" name="title" readonly>
		</van-field>

		<van-field label="模板说明" v-model="data.TemplateRemarks" name="title" readonly>
		</van-field>

		<FileUpload
        @CallBack="_fileUploadCb"
        :attachs="data.TemplateAttachs"
        :labelName="'模板文件'"
        :allowEdit="false"
      />

		<van-field
			label="备注"
			rows="3"
			autosize
			type="textarea"
			v-model="data.Remarks"
			readonly
		>
		</van-field>


		<FileUpload
        @CallBack="_fileUploadCb"
        :attachs="data.Attachs"
        :labelName="'上传文件'"
        :allowEdit="false"
      />


	</div>
</template>

<script>
import FileListReadOnly from "../../../components/Attach/FileListReadOnlyYat.vue";
export default {
	components: { FileListReadOnly },
	data() {
		return {
			id: this.$route.query.id,
			data: {
				
			},
			menuList: [],
			mobile: '',
			message: '',
			radio: '1',
			checkbox: false,
			checkboxGroup: [],
			value: '',
			showCalendar: false,
			activeNames: ['1'],
		
			showPopup: false,
			MannerItemPopup: false,
			userId: [],
			show: false,
			Component: '',
			CASNo: '',
			templateId: this.$route.query.templateId,
		}
	},
	beforeMount () {
		this.data = []

	},
	created() {
		this.getDetail();

	},
	activated() {},
	methods: {
		getDetail() {
			let params = { id: this.id, templateId: this.templateId };
			this.$axios
				.get('/YatManagementDocsApi/UploadOrView', { params: params })
				.then((res) => {
				this.data = res.data;
				if (this.data.IsMustInput == true) {
					this.data.IsMustInputName = '是'
				} else {
					this.data.IsMustInputName = '否'
				}
				});
		},
		_fileUploadCb(attachs) {
			this.data.attachs = attachs;
		},
		initNewEntity() {
			this.$axios
				.get('/YatManagementDocsApi/InitNewEntity', {})
				.then((res) => {
				this.data = res.data;
				});
		},
		
	},
}
</script>

<style lang="less" scoped>
.col-detail {
	color: #333;
	display: flex;
	align-items: center;
	justify-content: space-between;

	.col-del {
		display: flex;
		align-items: center;
		img {
			width: 15px;
			height: 15px;
			margin-right: 5px;
		}
	}
}
.valueclass {
	color: rgb(0, 195, 224);
}
.dialog-content-text {
	height: auto;
}
</style>
